1. Field of the Invention
The present invention relates to a numerical control device for a tool machine.
2. Description of the Related Art
A turning device for turning a crankshaft is known as an example of a tool machine (see, for example, JP 2003-266202).
The turning device disclosed in Patent Document 1 includes a work moving device that rotates a crankshaft serving as a work about a C axis, which is an axis of a main journal of the crankshaft, while supporting the crankshaft, and a tool moving device that moves a tool for machining linearly in the X axis direction perpendicular to the C axis and swings the tool about an α axis parallel to the C axis as a center. Further, in this turning device, as the crankshaft is rotated about the C axis by the work moving device, the linear movement of the tool in the X axis direction and the swinging thereof about the α axis performed by the tool moving device are NC controlled. As a result, the tool is moved and a pin journal that is eccentric with respect to the main journal of the crankshaft is machined by turning that follows the eccentric rotation of the pin journal, while the pin journal is eccentrically rotated.
However, the problem associated with typical tool machines, inclusive of such a turning device, is that when the movement directions of a work and a tool include different movement directions, a machining error occurs and the work machining accuracy is thereby decreased.
One of the factors causing the machining error is a phase error between movement directions occurring when the work and the tool are moved in a plurality of mutually different directions at mutually different acceleration-deceleration time constants. This is because setting different acceleration-deceleration time constants in different movement directions causes a difference in a time interval required for acceleration and deceleration between the movement directions, thereby creating a phase error between the movement directions.
Another factor causing the machining error is the so-called inner rotation error of the work and tool. For example, the following phenomenon occurs when a movement command is outputted that requires the movement directions of the work and tool to be changed and the movement speed of the work and tool to be rapidly changed in a predetermined position. Thus, the work and tool actually pass on the interior side of the movement command pass in the predetermined position. This inner rotation error is an error of the actual movement pass of the work and tool with respect to the movement command pass of the work and tool occurring due to such a phenomenon.
More specifically, in the tool machine, a control is typically performed by which primary distribution pulses are calculated by performing uniform primary distribution of a movement amount in each movement direction designated by the movement command for each predetermined calculation cycle, the primary distribution pulses of each calculation cycle are then secondary distributed in a distribution section following the calculation cycle corresponding thereto, and the work and tool are moved according to secondary distribution pulses calculated by accumulating the secondary distributed pulses for each calculation cycle. With such a control, even when a movement command requires rapid changes of movement speeds of the work and tool, the secondary distribution relaxes rapid changes in the movement speed and thereby shocks applied to the tool machine are reduced. However, a delay occurs in the movement positions of the work and tool following the secondary distribution pulses with respect to the movement positions of the work and tool following the movement command, this delay corresponding to the degree of relaxation of variations (acceleration-deceleration) in the movement speeds of the work and tool caused by the secondary distribution. As a result, the work and tool start moving in the changed movement direction before the work and tool reach the predetermined position and therefore the aforementioned inner rotation error occurs.